package com.company4.students;

import java.util.List;
import java.util.Scanner;

public class serchstudent {
    public static student seachStudent(Scanner sc, List<student> listStudents) {
        System.out.println("输入id");
        int id = sc.nextInt();
        for (student student : listStudents) {
            if (id == student.getId()) {
                return student;
            }
        }
        return null;
    }
}
